import 'package:flutter/material.dart';
import 'package:flutter_app/module/CommonUtils.dart';
import 'LeftContentWidget.dart';
import 'RightContentWidget.dart';

class ContentWidget extends StatefulWidget {
  @override
  _ContentState createState() => _ContentState();
}

class _ContentState extends State<ContentWidget> {
  @override
  Widget build(BuildContext context) {
    if (CommonUtils.getScreenWidth(context) <= 840) {
      return LeftContentWidget();
    }
    return Row(
      crossAxisAlignment: CrossAxisAlignment.start,
      children: [
        //左侧文章列表
        Expanded(flex: 2, child: LeftContentWidget()),
        //右侧文章列表
        Expanded(flex: 1, child: RightContentWidget())
      ],
    );
  }
}
